import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);
import VueAMap from 'vue-amap';

window.VueAMap = VueAMap;
window.mapPlugins = [
    'AMap.Geocoder',
    'TruckDriving',
    'Driving',
    'Walking',
    'Transfer',
    'Riding',
    'AMap.Weather',
    'AMap.ToolBar',
    'AMap.MassMarks',
    'AMap.Scale',
    'AMap.OverView',
    'AMap.MapType',
    'AMap.RangingTool'
];
window.mapKey = '95fa72137f4263f8e64ae01f766ad09c';
window.mapVersion = '1.4.15';
Vue.use(window.VueAMap);

if (!window.VueAMapInstaled) {
    Vue.use(window.VueAMap);
    window.VueAMap.initAMapApiLoader({
        key: window.mapKey,
        v: window.mapVersion,
        plugin: window.mapPlugins,
    });
    window.VueAMapInstaled = true;
}
Vue.config.productionTip = false
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
